package multidraw.model;

import java.util.ArrayList;
import java.util.List;

import multidraw.model.commands.Command;
import multidraw.model.commands.WrapperCommand;
import multidraw.util.ToolArchive;

/**
 * The interface provides methods to interact as a remote canvas.
 * This is in contrast with the native methods of Local cache to transfer 
 * the data to the server.
 * 
 * This interface is used mainly by the Command class to apply changes
 * to all kinds of canvases (at the local cache or at the central data model).
 * @author cuongbk
 *
 */
public interface Canvas {
	void applyAddShape(Shape s);
	
	void applyCommandToCoreData(Command c);
	
	long getNextID();
	
	void applyAddChar(long shapeID, char ch);
	
	List<Shape> getShapes();
	
	void setSelectedObjectIndex(int index);
	
	void applyAddUser(String name);
	
	String getSessionID();
	
	void applyToolList(ArrayList<ToolArchive> toolList);
	
	String getOwnerName();
	
	void applyWrapperCommand(WrapperCommand cmd);
	
	ArrayList<ClassLoader> getDynamicClassLoaders();
	
	void applyDropUser(String name);
	
	void applyTransferCommand(String name);
}
